(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
app(cons(x, l), k) →+ cons(x, app(l, k))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1].
The pumping substitution is [l / cons(x, l)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

S is empty.
Rewrite Strategy: FULL

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
app, sum, plus, gt

They will be analysed ascendingly in the following order:
app < sum
plus < sum
gt < plus

(8) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

The following defined symbols remain to be analysed:
app, sum, plus, gt

They will be analysed ascendingly in the following order:
app < sum
plus < sum
gt < plus

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Induction Base:
app(gen_nil:cons3_0(0), gen_nil:cons3_0(b)) →RΩ(1)
gen_nil:cons3_0(b)

Induction Step:
app(gen_nil:cons3_0(+(n6_0, 1)), gen_nil:cons3_0(b)) →RΩ(1)
cons(zero, app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b))) →IH
cons(zero, gen_nil:cons3_0(+(b, c7_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

The following defined symbols remain to be analysed:
gt, sum, plus

They will be analysed ascendingly in the following order:
plus < sum
gt < plus

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) → true, rt ∈ Ω(1 + n7980)

Induction Base:
gt(gen_s:zero:true:false4_0(+(1, 0)), gen_s:zero:true:false4_0(0)) →RΩ(1)
true

Induction Step:
gt(gen_s:zero:true:false4_0(+(1, +(n798_0, 1))), gen_s:zero:true:false4_0(+(n798_0, 1))) →RΩ(1)
gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) →IH
true

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) → true, rt ∈ Ω(1 + n7980)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

The following defined symbols remain to be analysed:
plus, sum

They will be analysed ascendingly in the following order:
plus < sum

(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol plus.

(16) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) → true, rt ∈ Ω(1 + n7980)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

The following defined symbols remain to be analysed:
sum

(17) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
sum(gen_nil:cons3_0(+(1, n1763_0))) → gen_nil:cons3_0(1), rt ∈ Ω(1 + n17630)

Induction Base:
sum(gen_nil:cons3_0(+(1, 0))) →RΩ(1)
cons(zero, nil)

Induction Step:
sum(gen_nil:cons3_0(+(1, +(n1763_0, 1)))) →RΩ(1)
sum(cons(plus(zero, zero), gen_nil:cons3_0(n1763_0))) →RΩ(1)
sum(cons(zero, gen_nil:cons3_0(n1763_0))) →IH
gen_nil:cons3_0(1)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(18) Complex Obligation (BEST)

(19) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) → true, rt ∈ Ω(1 + n7980)
sum(gen_nil:cons3_0(+(1, n1763_0))) → gen_nil:cons3_0(1), rt ∈ Ω(1 + n17630)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(21) BOUNDS(n^1, INF)

(22) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) → true, rt ∈ Ω(1 + n7980)
sum(gen_nil:cons3_0(+(1, n1763_0))) → gen_nil:cons3_0(1), rt ∈ Ω(1 + n17630)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(24) BOUNDS(n^1, INF)

(25) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
gt(gen_s:zero:true:false4_0(+(1, n798_0)), gen_s:zero:true:false4_0(n798_0)) → true, rt ∈ Ω(1 + n7980)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

No more defined symbols left to analyse.

(26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(27) BOUNDS(n^1, INF)

(28) Obligation:

TRS:
Rules:
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) → sum(app(l, sum(cons(x, cons(y, k)))))
plus(s(x), s(y)) → s(s(plus(if(gt(x, y), x, y), if(not(gt(x, y)), id(x), id(y)))))
plus(s(x), x) → plus(if(gt(x, x), id(x), id(x)), s(x))
plus(zero, y) → y
plus(id(x), s(y)) → s(plus(x, if(gt(s(y), y), y, s(y))))
id(x) → x
if(true, x, y) → x
if(false, x, y) → y
not(x) → if(x, false, true)
gt(s(x), zero) → true
gt(zero, y) → false
gt(s(x), s(y)) → gt(x, y)

Types:
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: s:zero:true:false → nil:cons → nil:cons
sum :: nil:cons → nil:cons
plus :: s:zero:true:false → s:zero:true:false → s:zero:true:false
s :: s:zero:true:false → s:zero:true:false
if :: s:zero:true:false → s:zero:true:false → s:zero:true:false → s:zero:true:false
gt :: s:zero:true:false → s:zero:true:false → s:zero:true:false
not :: s:zero:true:false → s:zero:true:false
id :: s:zero:true:false → s:zero:true:false
zero :: s:zero:true:false
true :: s:zero:true:false
false :: s:zero:true:false
hole_nil:cons1_0 :: nil:cons
hole_s:zero:true:false2_0 :: s:zero:true:false
gen_nil:cons3_0 :: Nat → nil:cons
gen_s:zero:true:false4_0 :: Nat → s:zero:true:false

Lemmas:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(zero, gen_nil:cons3_0(x))
gen_s:zero:true:false4_0(0) ⇔ zero
gen_s:zero:true:false4_0(+(x, 1)) ⇔ s(gen_s:zero:true:false4_0(x))

No more defined symbols left to analyse.

(29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n6_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(30) BOUNDS(n^1, INF)